package com.carful.xigua.modules.common.security;

/**
 * @author Administrator
 * Date 2024/2/7 9:41
 * Description
 */

public interface PermissionHandler<T, R> {

    boolean isPre(T target, Object... args);

    boolean isPost(R returnObject, Object... args);

    /**
     *
     * @param target 权限/角色
     * @param args 参数列表
     * @return
     */
    boolean preHandle(T target, Object... args);

    /**
     *
     * @param returnObject 返回值
     * @param args 参数列表
     * @return
     */
    boolean postHandle(R returnObject, Object... args);
}
